<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Calico: calico::sensors::DoubleSphereModel Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Calico
   </div>
   <div id="projectbrief">A visual-inertial calibration library designed for rapid problem construction and debugging.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacecalico.html">calico</a></li><li class="navelem"><a class="el" href="namespacecalico_1_1sensors.html">sensors</a></li><li class="navelem"><a class="el" href="classcalico_1_1sensors_1_1DoubleSphereModel.html">DoubleSphereModel</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="classcalico_1_1sensors_1_1DoubleSphereModel-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">calico::sensors::DoubleSphereModel Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="camera__models_8h_source.html">camera_models.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for calico::sensors::DoubleSphereModel:</div>
<div class="dyncontent">
<div class="center"><img src="classcalico_1_1sensors_1_1DoubleSphereModel__inherit__graph.png" border="0" usemap="#acalico_1_1sensors_1_1DoubleSphereModel_inherit__map" alt="Inheritance graph"/></div>
<map name="acalico_1_1sensors_1_1DoubleSphereModel_inherit__map" id="acalico_1_1sensors_1_1DoubleSphereModel_inherit__map">
<area shape="rect" title=" " alt="" coords="5,80,200,121"/>
<area shape="rect" href="classcalico_1_1sensors_1_1CameraModel.html" title="Base class for camera models." alt="" coords="5,5,200,32"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for calico::sensors::DoubleSphereModel:</div>
<div class="dyncontent">
<div class="center"><img src="classcalico_1_1sensors_1_1DoubleSphereModel__coll__graph.png" border="0" usemap="#acalico_1_1sensors_1_1DoubleSphereModel_coll__map" alt="Collaboration graph"/></div>
<map name="acalico_1_1sensors_1_1DoubleSphereModel_coll__map" id="acalico_1_1sensors_1_1DoubleSphereModel_coll__map">
<area shape="rect" title=" " alt="" coords="5,80,200,121"/>
<area shape="rect" href="classcalico_1_1sensors_1_1CameraModel.html" title="Base class for camera models." alt="" coords="5,5,200,32"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a3c419936a38e53f94033d0604f7d7acf"><td class="memItemLeft" align="right" valign="top"><a id="a3c419936a38e53f94033d0604f7d7acf"></a>
<a class="el" href="classcalico_1_1sensors_1_1DoubleSphereModel.html">DoubleSphereModel</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="classcalico_1_1sensors_1_1DoubleSphereModel.html">DoubleSphereModel</a> &amp;)=default</td></tr>
<tr class="separator:a3c419936a38e53f94033d0604f7d7acf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a567916e1aa137c22fca5ad36eb573a"><td class="memItemLeft" align="right" valign="top"><a id="a9a567916e1aa137c22fca5ad36eb573a"></a>
<a class="el" href="namespacecalico_1_1sensors.html#a1eaf57959273c4ea8dc8899a2e724a2f">CameraIntrinsicsModel</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcalico_1_1sensors_1_1DoubleSphereModel.html#a9a567916e1aa137c22fca5ad36eb573a">GetType</a> () const final</td></tr>
<tr class="memdesc:a9a567916e1aa137c22fca5ad36eb573a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Getter for camera model type. <br /></td></tr>
<tr class="separator:a9a567916e1aa137c22fca5ad36eb573a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc9cae152ae02f4aa347d92bab1144fa"><td class="memItemLeft" align="right" valign="top"><a id="afc9cae152ae02f4aa347d92bab1144fa"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcalico_1_1sensors_1_1DoubleSphereModel.html#afc9cae152ae02f4aa347d92bab1144fa">NumberOfParameters</a> () const final</td></tr>
<tr class="memdesc:afc9cae152ae02f4aa347d92bab1144fa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Getter for the number of parameters for this camera model. <br /></td></tr>
<tr class="separator:afc9cae152ae02f4aa347d92bab1144fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classcalico_1_1sensors_1_1CameraModel"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classcalico_1_1sensors_1_1CameraModel')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classcalico_1_1sensors_1_1CameraModel.html">calico::sensors::CameraModel</a></td></tr>
<tr class="memitem:af2b6c4e6787815273879f81a216bc84d inherit pub_methods_classcalico_1_1sensors_1_1CameraModel"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:af2b6c4e6787815273879f81a216bc84d inherit pub_methods_classcalico_1_1sensors_1_1CameraModel"><td class="memTemplItemLeft" align="right" valign="top">absl::StatusOr&lt; Eigen::Vector2&lt; T &gt; &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classcalico_1_1sensors_1_1CameraModel.html#af2b6c4e6787815273879f81a216bc84d">ProjectPoint</a> (const Eigen::VectorX&lt; T &gt; &amp;intrinsics, const Eigen::Vector3&lt; T &gt; &amp;point) const</td></tr>
<tr class="separator:af2b6c4e6787815273879f81a216bc84d inherit pub_methods_classcalico_1_1sensors_1_1CameraModel"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9724081a0bfba064a65bde83cded5dc9 inherit pub_methods_classcalico_1_1sensors_1_1CameraModel"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:a9724081a0bfba064a65bde83cded5dc9 inherit pub_methods_classcalico_1_1sensors_1_1CameraModel"><td class="memTemplItemLeft" align="right" valign="top">absl::StatusOr&lt; Eigen::Vector3&lt; T &gt; &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classcalico_1_1sensors_1_1CameraModel.html#a9724081a0bfba064a65bde83cded5dc9">UnprojectPixel</a> (const Eigen::VectorX&lt; T &gt; &amp;intrinsics, const Eigen::Vector2&lt; T &gt; &amp;pixel) const</td></tr>
<tr class="separator:a9724081a0bfba064a65bde83cded5dc9 inherit pub_methods_classcalico_1_1sensors_1_1CameraModel"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a911a3897069d2b40686bb79a13730fda"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:a911a3897069d2b40686bb79a13730fda"><td class="memTemplItemLeft" align="right" valign="top">static absl::StatusOr&lt; Eigen::Vector2&lt; T &gt; &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classcalico_1_1sensors_1_1DoubleSphereModel.html#a911a3897069d2b40686bb79a13730fda">ProjectPoint</a> (const Eigen::VectorX&lt; T &gt; &amp;intrinsics, const Eigen::Vector3&lt; T &gt; &amp;point)</td></tr>
<tr class="separator:a911a3897069d2b40686bb79a13730fda"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a032d0e2b98603b2ac675e4730295588a"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:a032d0e2b98603b2ac675e4730295588a"><td class="memTemplItemLeft" align="right" valign="top">static absl::StatusOr&lt; Eigen::Vector3&lt; T &gt; &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classcalico_1_1sensors_1_1DoubleSphereModel.html#a032d0e2b98603b2ac675e4730295588a">UnprojectPixel</a> (const Eigen::VectorX&lt; T &gt; &amp;intrinsics, const Eigen::Vector2&lt; T &gt; &amp;pixel)</td></tr>
<tr class="separator:a032d0e2b98603b2ac675e4730295588a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_static_methods_classcalico_1_1sensors_1_1CameraModel"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_classcalico_1_1sensors_1_1CameraModel')"><img src="closed.png" alt="-"/>&#160;Static Public Member Functions inherited from <a class="el" href="classcalico_1_1sensors_1_1CameraModel.html">calico::sensors::CameraModel</a></td></tr>
<tr class="memitem:aeda2cd0d8d899ba285a7e610b32fd2a4 inherit pub_static_methods_classcalico_1_1sensors_1_1CameraModel"><td class="memItemLeft" align="right" valign="top">static std::unique_ptr&lt; <a class="el" href="classcalico_1_1sensors_1_1CameraModel.html">CameraModel</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcalico_1_1sensors_1_1CameraModel.html#aeda2cd0d8d899ba285a7e610b32fd2a4">Create</a> (<a class="el" href="namespacecalico_1_1sensors.html#a1eaf57959273c4ea8dc8899a2e724a2f">CameraIntrinsicsModel</a> camera_model)</td></tr>
<tr class="separator:aeda2cd0d8d899ba285a7e610b32fd2a4 inherit pub_static_methods_classcalico_1_1sensors_1_1CameraModel"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:a2aae70dc6759783f3504c9deb6651894"><td class="memItemLeft" align="right" valign="top"><a id="a2aae70dc6759783f3504c9deb6651894"></a>
static constexpr int&#160;</td><td class="memItemRight" valign="bottom"><b>kNumberOfParameters</b> = 5</td></tr>
<tr class="separator:a2aae70dc6759783f3504c9deb6651894"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0184e53fc7eda61220835e0020836c62"><td class="memItemLeft" align="right" valign="top"><a id="a0184e53fc7eda61220835e0020836c62"></a>
static constexpr <a class="el" href="namespacecalico_1_1sensors.html#a1eaf57959273c4ea8dc8899a2e724a2f">CameraIntrinsicsModel</a>&#160;</td><td class="memItemRight" valign="bottom"><b>kModelType</b> = <a class="el" href="namespacecalico_1_1sensors.html#a1eaf57959273c4ea8dc8899a2e724a2faff638d15c8b2b0f612376181393188fd">CameraIntrinsicsModel::kDoubleSphere</a></td></tr>
<tr class="separator:a0184e53fc7eda61220835e0020836c62"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Double-Sphere projection model. This model assumes an isotropic pinhole model, i.e. \(f_x == f_y = f\).<br  />
Parameters are in the following order: \([f, c_x, c_y, \xi, \alpha]\)<br  />
<br  />
 </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a911a3897069d2b40686bb79a13730fda"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a911a3897069d2b40686bb79a13730fda">&#9670;&nbsp;</a></span>ProjectPoint()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static absl::StatusOr&lt;Eigen::Vector2&lt;T&gt; &gt; calico::sensors::DoubleSphereModel::ProjectPoint </td>
          <td>(</td>
          <td class="paramtype">const Eigen::VectorX&lt; T &gt; &amp;&#160;</td>
          <td class="paramname"><em>intrinsics</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const Eigen::Vector3&lt; T &gt; &amp;&#160;</td>
          <td class="paramname"><em>point</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns projection \(\mathbf{p}\), a 2-D pixel coordinate such that </p><p class="formulaDsp">
\[ \mathbf{p} = \left[\begin{matrix}f&amp;0\\0&amp;f\end{matrix}\right]\mathbf{p}_d + \left[\begin{matrix}c_x\\c_y\end{matrix}\right]\\ \mathbf{p}_d = \left(\alpha d + \left(1-\alpha\right) \left(\xi r+t_z\right)\right)^{-1} \left[\begin{matrix}t_x\\t_y\end{matrix}\right]\\ d = \sqrt{r^2\left(1 + \xi^2\right) + 2\xi r t_z}\\ r^2 = {\mathbf{t}^s_{sx}}^T\mathbf{t}^s_{sx} \]
</p>
<p> <code>intrinsics</code> is a vector of intrinsics parameters the following order: \([f, c_x, c_y, \xi, \alpha]\)<br  />
<br  />
<code>point</code> is the location of the feature resolved in the camera frame \(\mathbf{t}^s_{sx} = \left[\begin{matrix}t_x&amp;t_y&amp;t_z\end{matrix}\right]^T\).<br  />
 </p>

</div>
</div>
<a id="a032d0e2b98603b2ac675e4730295588a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a032d0e2b98603b2ac675e4730295588a">&#9670;&nbsp;</a></span>UnprojectPixel()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static absl::StatusOr&lt;Eigen::Vector3&lt;T&gt; &gt; calico::sensors::DoubleSphereModel::UnprojectPixel </td>
          <td>(</td>
          <td class="paramtype">const Eigen::VectorX&lt; T &gt; &amp;&#160;</td>
          <td class="paramname"><em>intrinsics</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const Eigen::Vector2&lt; T &gt; &amp;&#160;</td>
          <td class="paramname"><em>pixel</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Inverts the projection model \(\mathbf{P}\) to obtain the bearing vector \(\mathbf{p}_m\) of the pixel location \(\mathbf{p}\). </p><p class="formulaDsp">
\[ \mathbf{p}_m = \mathbf{p}_s / \|\mathbf{p}_s\|\\ \mathbf{p}_s = \frac{m_z\xi + \sqrt{m_z^2 + (1-\xi^2)r^2}}{m_z^2+r^2} \left[\begin{matrix}m_x\\m_y\\m_z\end{matrix}\right] - \left[\begin{matrix}0\\0\\\xi\end{matrix}\right]\\ r^2 = {\mathbf{p}}^T\mathbf{p},\\ m_x = \frac{p_x - c_x}{f}, m_y = \frac{p_y - c_y}{f}, m_z = \frac{1-\alpha^2r^2}{\alpha\sqrt{1-(2\alpha-1)r^2}+1-\alpha}\\ \mathbf{p} = \left[\begin{matrix}p_x\\p_y\end{matrix}\right] \]
</p>
<p> <code>intrinsics</code> is a vector of intrinsics parameters the following order: \([f, c_x, c_y, \xi, \alpha]\)<br  />
<br  />
 </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>calico/sensors/<a class="el" href="camera__models_8h_source.html">camera_models.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
